/*
 * @(#)GSException.java
 * 
 * Project: BUS
 *  
 *  Modify Information:
 *  =========================================================================
 *  Change History:
 *  Author     Date       Description
 *  ========== ========== ===================================================
 *  Jenny Li   2006-02-07 新增
 * 
 * Copyright Notice: Copyright (c) 2001-2005 Beijing HiTRUST Technology Co.,
 * Ltd. 1808 Room, Science & Technology Building, No. 9 South Street, Zhong Guan
 * Cun, Haidian District, Beijing ,100081, China All rights reserved.
 * 
 * This software is the confidential and proprietary information of HiTRUST.COM,
 * Inc. ('Confidential Information'). You shall not disclose such Confidential
 * Information and shall use it only in accordance with the terms of the license
 * agreement you entered into with HiTRUST.
 * 
 * Warning:
 * =========================================================================
 * 
 */
package com.hitrust.gs.util.exception;

import com.hitrust.gs.lib.db.GSBaseDAO;

import framework.core.LogWriter;

/**
 * @author Administrator
 * 
 */
public class GSException extends Exception {
    /**
     * 
     */
    private static final long serialVersionUID = 2397557903897386712L;
    public static String      E00001         = "E00001";
    public static String      E00001_MSG     = "系统异常,请通知系统管理员!";
    
    public static String      E00002         = "E00002";
    public static String      E00002_MSG     = "用户连接超时，请重新登录系统";

    public static String      E00003         = "E00003";
    public static String      E00003_MSG     = "页面传入后台的参数值为空";

    public static String      E00004         = "E00004";
    public static String      E00004_MSG     = "页面传入后台的参数长度不正确";

    public static String      E10001         = "E10001";
    public static String      E10001_MSG     = "查询操作员所在机构及该机构下级机构发生异常";
    
    public static String      E10002         = "E10002";
    public static String      E10002_MSG     = "查询操作员时发生异常";
    
    public static String      E10011         = "E10011";
    public static String      E10011_MSG     = "查询不到产品";
    
    public static String      E10021         = "E10021";
    public static String      E10021_MSG     = "查询供应商时发生异常";
    
    public static String      E10022         = "E10022";
    public static String      E10022_MSG     = "查询供应商明细时发生异常";
    
    public static String      E10030         = "E10030";
    public static String      E10030_MSG     = "查询产品明细时发生异常";
    
    public static String      E10031         = "E10031";
    public static String      E10031_MSG     = "查询不到产品明细信息";
    
    public static String      E10032         = "E10032";
    public static String      E10032_MSG     = "产品编码不存在";
    
    public static String      E10033         = "E10033";
    public static String      E10033_MSG     = "此操作员无可用功能权限";
    
    public static String      E10034         = "E10034";
    public static String      E10034_MSG     = "无此操作员";
    
    public static String      E10035         = "E10035";
    public static String      E10035_MSG     = "操作员密码错误";
    
    public static String      E10036         = "E10036";
    public static String      E10037         = "当前操作员无此功能权限";
    
    public static String      E10040         = "E10040";
    public static String      E10040_MSG     = "查询不到订单信息";

    public static String      E10041         = "E10041";
    public static String      E10041_MSG     = "查询申购单及产品信息时异常";

    public static String      E10042         = "E10042";
    public static String      E10042_MSG     = "查询申购单所包含的产品明细信息时异常";

    public static String      E10043         = "E10043";
    public static String      E10043_MSG     = "提交订单发生异常";
    
    public static String      E10044         = "E10044";
    public static String      E10044_MSG     = "订单取消操作失败";
    
    public static String      E10045         = "E10045";
    public static String      E10045_MSG     = "订单状态修正操作失败";
    
    public static String      E10046         = "E10046";
    public static String      E10046_MSG     = "订单状态不是申请状态,订单取消操作失败";
    
    public static String      E10047         = "E10047";
    public static String      E10047_MSG     = "您不是该订单的录入人员,订单取消操作失败";
    
    public static String      E10048         = "E10048";
    public static String      E10048_MSG     = "您不是订单的初审人员,订单状态修正操作失败";
    
    public static String      E10049         = "E10049";
    public static String      E10049_MSG     = "您不是订单的复审人员,订单状态修正操作失败";
    
    public static String      E10449         = "E10449";
    public static String      E10449_MSG     = "订单明细状态不一致,订单状态修正操作失败";
    
    public static String      E10440         = "E10440";
    public static String      E10440_MSG     = "您不是运营公司人员,订单取消操作失败";
    
    public static String      E10441         = "E10441";
    public static String      E10441_MSG     = "您不是运营公司人员,订单状态修正操作失败";
    
    public static String      E10442         = "E10442";
    public static String      E10442_MSG     = "您不是巴士公司人员,订单取消操作失败";
    
    public static String      E10443         = "E10443";
    public static String      E10443_MSG     = "您不是巴士公司人员,订单状态修正操作失败";
    
    public static String      E10050         = "E10050";
    public static String      E10050_MSG     = "SOCKET方式连接服务端发生IO异常";
    
    public static String      E10051         = "E10051";
    public static String      E10051_MSG     = "修改订单明细状态失败";
    
    public static String      E10052         = "E10052";
    public static String      E10052_MSG     = "交易平台向集中采购系统发送订单明细送货确认信息的格式错误";
    
    public static String      E10053         = "E10053";
    public static String      E10053_MSG     = "订单明细调整修改订单明细时发生异常";

    public static String      E10054         = "E10054";
    public static String      E10054_MSG     = "订单明细调整修改订单明细失败";
    
    public static String      E10055         = "E10055";
    public static String      E10055_MSG     = "采购网传入的参数Action的值不符合定义";

    public static String      E10056         = "E10056";
    public static String      E10056_MSG     = "新密码和确认新密码不能为空或空字符";

    public static String      E10057         = "E10057";
    public static String      E10057_MSG     = "两次输入的密码不一致";

    public static String      E10058         = "E10058";
    public static String      E10058_MSG     = "原密码输入错误";

    public static String      E10059         = "E10059";
    public static String      E10059_MSG     = "该操作员帐号已存在";

    public static String      E10060         = "E10060";
    public static String      E10060_MSG     = "新增操作员帐号失败，请检查数据";

    public static String      E10061         = "E10061";
    public static String      E10061_MSG     = "修改操作员信息失败，请检查数据";

    public static String      E10062         = "E10062";
    public static String      E10062_MSG     = "删除操作员帐号失败，请检查数据";
    
    public static String      E10063         = "E10063";
    public static String      E10063_MSG     = "查询订货部门所有的送货地址时异常";
    
    public static String      E10064         = "E10064";
    public static String      E10064_MSG     = "查询订货单位及单位送货地址时异常";
    
    public static String      E10065         = "E10065";
    public static String      E10065_MSG     = "非网上订单收货确认信息录入时异常";
    
    public static String      E10066         = "E10066";
    public static String      E10066_MSG     = "订单取消操作异常";
    
    public static String      E19993         = "E19993";
    public static String      E19993_MSG     = "为分页显示查询总笔数时异常";
    
    public static String      E19994         = "E19994";
    public static String      E19994_MSG     = "数据库操作异常";
    
    public static String      E19995         = "E19995";
    public static String      E19995_MSG     = "修改DB数据失败,请通知系统管理员!";
    
    public static String      E19996         = "E19996";
    public static String      E19996_MSG     = "删除DB数据失败,请通知系统管理员!";
    
    public static String      E19997         = "E19997";
    public static String      E19997_MSG     = "新增DB数据失败,请通知系统管理员!";
    
    public static String      E19998         = "E19998";
    public static String      E19998_MSG     = "修改DB数据失败,请通知系统管理员!";
    
    public static String      E19999         = "E19999";
    public static String      E19999_MSG     = "数据库查询失败";
    
    public static String      E20031         = "E20031";
    public static String      E20031_MSG     = "查询不到机构";
    
    public static String      E20032         = "E20032";
    public static String      E20032_MSG     = "非法的机构编号";
    
    public static String 	  E20041		   = "E20041";
    public static String 	  E20041_MSG	   = "查询不到产品";
    
    public static String 	  E20042		   = "E20042";
    public static String 	  E20042_MSG	   = "录入产品时发生DB操作错误";
    
    public static String 	  E20043		   = "E20043";
    public static String 	  E20043_MSG	   = "查询产品时发生DB操作错误";
    
    public static String      E20051         = "E20051";
    public static String 	  E20051_MSG	   = "录入申购单时操作申购单/申购单明细表失败";
    
    public static String      E20052         = "E20052";
    public static String 	  E20052_MSG	   = "初审申购单时操作申购单/申购单明细表失败";
    
    public static String      E20053         = "E20053";
    public static String 	  E20053_MSG	   = "复审申购单时操作申购单/申购单明细表失败";
    
    public static String      E20054         = "E20054";
    public static String 	  E20054_MSG	   = "初审/复审申购单时操作申购单/申购单明细表失败";
    
    public static String      E20055         = "E20055";
    public static String 	  E20055_MSG	   = "审核订单时查询订单/订单明细表失败";
    
    public static String      E20056         = "E20056";
    public static String 	  E20056_MSG	   = "审核订单时操作订单/订单明细表失败";

    public static String      E20057         = "E20057";
    public static String 	  E20057_MSG	   = "代录订单时操作订单/订单明细表失败";
    
    public static String      E20071         = "E20071";
    public static String      E20071_MSG     = "查询订单及产品信息时异常";

    public static String      E20072         = "E20072";
    public static String      E20072_MSG     = "查询订单所包含的产品明细信息时异常";
    
    
    public static String      E17777         = "E17777";
    public static String 	  E17777_MSG	   = "流水号生成时发生错误";
    
    public static String      E17778         = "E17778";
    public static String 	  E17778_MSG	   = "读取或创建对帐文件下载路径时发生错误，无法正常读取对帐文件";

    public static String      E17776         = "E17776";
    public static String 	  E17776_MSG	   = "获得格式化的系统时间时发生错误，无法构造下载文件名";

    public static String      E17779         = "E17779";
    public static String 	  E17779_MSG	   = "存盘产品图片时发生错误";
    
    public static String      E500201         = "E500201";
    public static String 	  E500201_MSG	   = "选择备份文件为空";

    public static String      E500202         = "E500202";
    public static String 	  E500202_MSG	   = "数据恢复出现异常,详见日志信息";

    public static String      E500203         = "E500203";
    public static String 	  E500203_MSG	   =  "选择备份文件不存在";
    
    public static String      E500101         = "E500101";
    public static String 	  E500101_MSG	   = "数据备份出现异常,详见日志信息";

    public static String      E17780         = "E17780";
    public static String 	  E17780_MSG	   = "下载对帐文件时发生I/O错误，请稍候手工下载";
    
    public static String      E17781         = "E17781";
    public static String 	  E17781_MSG	   = "无法读取对帐原始订单明细数据";
    
    public static String      E17782         = "E17782";
    public static String 	  E17782_MSG	   = "读取指定日期的对帐差错数据发生错误";
    
    public static String      E17783         = "E17783";
    public static String 	  E17783_MSG	   = "初始化对帐结果表发生错误";
    
    public static String      E17784         = "E17784";
    public static String 	  E17784_MSG	   = "记录对帐统计信息时发生错误";
    
    public static String      E17785         = "E17785";
    public static String 	  E17785_MSG	   = "记录对帐结果状态时发生错误";
    
    public static String      E17786         = "E17786";
    public static String 	  E17786_MSG	   = "记录有差错的对帐数据时发生错误";

    public static String      E17787         = "E17787";
    public static String 	  E17787_MSG	   = "为重新下载对帐文件清理对帐结果表时发生错误";
    
    public static String      E17788         = "E17788";
    public static String 	  E17788_MSG	   = "向数据库记录下载结果信息时发生错误";
    
    public static String      E17789         = "E17789";
    public static String 	  E17789_MSG	   = "为重新对帐重置对帐结果为初始状态时发生错误";
    
    public static String      E17790         = "E17790";
    public static String 	  E17790_MSG	   = "EXCEL对帐文件读取错误";
    
    public static String	  E17791		   = "E17791";
    public static String 	  E17791_MSG	   = "设置用户权限时发生DB操作错误";
    
    public static String      E17792         = "E17792";
    public static String      E17792_MSG     = "下载导入数据文件时发生I/O错误，请稍候手工下载";
    
    public static String      E17793         = "E17779";
    public static String      E17793_MSG       = "上传文件时发生错误";
    
    public static String      E20076         = "E20076";
    public static String      E20076_MSG     = "产品种类存在下级种类，请先删除下级种类";
    
    public static String      E20077                = "E20077";
    public static String      E20077_MSG            = "查询产品种类的下级种类发生异常";
    
    public static String      E20080         = "E20080";
    public static String      E20080_MSG     = "查询应收应付信息时发生异常";
    
    public static String      E20081         = "E20081";
    public static String      E20081_MSG     = "执行应收应付过账时发生异常";
    
    public static String      E20082         = "E20082";
    public static String      E20082_MSG     = "执行应收应付自动冲销时发生异常";
    
    public static String      E20083         = "E20083";
    public static String      E20083_MSG     = "执行应收应付手动冲销时发生异常";
    
    public static String      E20084         = "E20084";
    public static String      E20084_MSG     = "向收付款表增加记录时发生异常";
    
    public static String      E20085         = "E20085";
    public static String      E20085_MSG     = "查询收付款表记录时发生异常";
    
    public static String      E30001                = "E30001";
    public static String      E30001_MSG            = "应急采购执行确认操作异常";
    
    public static String      E30002                = "E30002";
    public static String      E30002_MSG            = "该笔应急采购订单已存在于订单表中";
    
    public static String      E40001                = "E40001";
    public static String      E40001_MSG            = "已存在该订货单位此月份的结算信息";
    
    public static String      E40002                = "E40002";
    public static String      E40002_MSG            = "无可生成对帐信息的数据";
    
    public static String      E40003                = "E40003";
    public static String      E40003_MSG            = "订货单位结算信息执行作废操作失败";
    
    public static String      E40004                = "E40004";
    public static String      E40004_MSG            = "供应商结算信息执行作废操作失败";
    
    public static String      E40005                = "E40005";
    public static String      E40005_MSG            = "无此订货单位在该月份的结算信息";
    
    public static String      E40006                = "E40006";
    public static String      E40006_MSG            = "对帐录入时，修改订单明细为已结算状态失败";    
    
    public static String      E40007                = "E40007";
    public static String      E40007_MSG            = "未查询到该笔结算信息对应的订单明细";
    
    public static String      E40008                = "E40008";
    public static String      E40008_MSG            = "作废供应商结算信息时删除已结算的应收应付信息失败";  
    
    public static String      E40009                = "E40009";
    public static String      E40009_MSG            = "根据供应商简称未查到相关供应商信息";
    
    public static String      E40010                = "E40010";
    public static String      E40010_MSG            = "无此供应商在该月份的结算信息";
    
    public static String      E40011                = "E40011";
    public static String      E40011_MSG            = "修改已纳入结算的订单明细失败";

    public static String      E40012                = "E40012";
    public static String      E40012_MSG            = "未查到该笔明细对应的结算信息，请检查数据";
    
    public static String      E40013                = "E40013";
    public static String      E40013_MSG            = "修改订单明细对应的订货单位结算金额失败";
    
    public static String      E40014                = "E40014";
    public static String      E40014_MSG            = "修改订单明细对应的供应商结算金额失败";
    
    public static String      E40015                = "E40015";
    public static String      E40015_MSG            = "增加结算订单修改已存在的订货单位结算信息失败";
    
    public static String      E40016                = "E40016";
    public static String      E40016_MSG            = "本月已无供应商可生成应付信息";
    
    public static String      E40017                = "E40017";
    public static String      E40017_MSG            = "新增应付信息到应收应付表失败";
    
    public static String      E40018                = "E40018";
    public static String      E40018_MSG            = "修改结算表中结算标志失败";
    
    public static String      E40019                = "E40019";
    public static String      E40019_MSG            = "本月尚有订货单位未生成应收款,请先执行生成应收款操作!";
    
    public static String      E40051                = "E40051";
    public static String      E40051_MSG            = "为订货单位生成本月结算数据失败!";
    
    public static String      E40052                = "E40052";
    public static String      E40052_MSG            = "为供应商生成本月结算数据失败!";
    
    public static String      E40053                = "E40053";
    public static String      E40053_MSG            = "已存在供应商此月份的结算信息";
    
    public static String      E90000                = "E90000";
    public static String      E90000_MSG            = "设置系统参数出现异常";
    /**
     * 例外代码
     */
    protected String          iErrCode         = "";

    /**
     * 详细信息
     */
    protected String          iErrMessage      = "";

    /**
     * 构造CUPSecureException对象，并给定对象[异常信息]属性。
     * 
     * @param aMessage
     *            异常信息
     */
    public GSException(String aMessage) 
    {   
        super(aMessage+"("+GSBaseDAO.popSQLError()+")");
        LogWriter.error(aMessage);
    }

    /**
     * 构造CUPSecureException对象，并给定对象[异常代码]及[异常信息]属性。
     * 
     * @param aCode
     *            异常代码
     * @param aMessage
     *            异常信息
     */
    public GSException(String aCode, String aMessage) 
    {
      	super(aMessage+"("+GSBaseDAO.popSQLError()+")");
        iErrCode = aCode.trim();
    }

    /**
     * 取得异常代码
     * 
     * @return 异常代码
     */
    public String getCode() {
        return iErrCode;
    }

    /**
     * 取得异常信息
     * 
     * @return 异常信息
     */
    public String getMessage() 
    {
        return super.getMessage();
    }

    /**
     * 构造TrxException对象，并给定对象[例外代码]、[例外信息]及[详细信息]属性。
     * 
     * @param aCode
     *            例外代码
     * @param aMessage
     *            例外信息
     * @param aDetailMessage
     *            详细信息
     */
    public GSException(String aCode, String aMessage, String aDetailMessage) 
    {
		super(aMessage+"("+GSBaseDAO.popSQLError()+")");
        iErrCode = aCode.trim();
        iErrMessage = aDetailMessage.trim();
    }
}

